/*
 *  CEScene.h
 *  LID Library
 *
 *  Created by Alexander Trutchenko on 09/11/11.
 *  Copyright 2011 League of Independent Developers. All rights reserved.
 *
 */

#ifndef __CE_Scene_h__
#define __CE_Scene_h__

#include "cocos2d.h"

namespace cocosext {

////////////////////////////////////////////////////////
//
/** CEScene
 *  
*/
////////////////////////////////////////////////////////

class CEScene : public cocos2d::CCScene
{
protected:
	bool _isFilled;
	bool _mustResetTrigger;

protected:
	CEScene():_isFilled(false), _mustResetTrigger(false) {;}
	virtual ~CEScene() {;}

public:
    // static constructor
    static CEScene* scene();

protected:
    bool init();

public:
	// Main interface
	virtual void fillScene();
	virtual void clearScene();

	virtual void onBeforeReset() { _mustResetTrigger = true; }
	virtual void onBeforeEnterBackground() {;}
	virtual void onBeforeReturnToForeground() {;}

	//Cocos2d functions
	virtual void onEnter(); // free resources if nessesary
	virtual void onExit(); // load resources if nessesary
	virtual void cleanup();

}; // CEScene

}; // end namespace cocosext

#endif // __CE_Scene_h__
